package com.accesshollywood.models;

import java.util.ArrayList;

import javax.swing.DefaultComboBoxModel;

public class CloneableComboBoxModel extends DefaultComboBoxModel implements Cloneable {
	public CloneableComboBoxModel() {
		super();
	}
	
	public CloneableComboBoxModel clone(){
		CloneableComboBoxModel newModel = new CloneableComboBoxModel();
		for(int i = 0; i < this.getSize(); i++){
			newModel.addElement(this.getElementAt(i));
		}
		return newModel;
	}
	
	public ArrayList toArrayList(){
		ArrayList elements = new ArrayList();
		for(int i = 0; i < this.getSize(); i++){
			elements.add(this.getElementAt(i));
		}
		return elements;
	}
}
